package it.uniroma2.structure;

import java.io.Serializable;


public class LinkServiceNode implements Serializable {
	private Node fromNode;
	private Node toNode;
	private Assign pairsCopy;
	
	public LinkServiceNode(String name, Node f, Node t){
		this.fromNode = f;
		this.toNode = t;
		this.pairsCopy = new Assign();
	}

	public Node getFromNode() {
		return fromNode;
	}

	public void setFromNode(Node fromNode) {
		this.fromNode = fromNode;
	}

	public Node getToNode() {
		return toNode;
	}

	public void setToNode(Node toNode) {
		this.toNode = toNode;
	}


	public Assign getAssigns() {
		return pairsCopy;
	}
	
	
	public void setAssign(Assign pairs) {
		this.pairsCopy = pairs;
	}
	
	
	public void addCopy(Parameter from, Parameter to) {
		this.pairsCopy.addNewCopy(from, to);
	}
	
	@Override
	public String toString() {
		return "";
	}
	
	
	public String toBPEL(){
		String output = "";
		output = output + this.pairsCopy.toBPEL();
//		String output = "<" + assignTag + " validate=\"" + this.validate + "\" name=\"" + this.name + "\">\n";
		return output;
	}
	
}
